#ifndef BSP_H
#define BSP_H

class MApplication;
class MEventLoop;
class MEventLoopPrivate;
class MObject;
class MIODevice;
class __Atomic_Lock__;

class BSP
{
	private:
		static BSP *uniqueObject();
		int DeviceInitialize();

	public:
		void disableInterrupt();
		void enableInterrupt();

		struct ITlocker
		{
			inline ITlocker() { BSP::uniqueObject()->disableInterrupt(); }
			inline ~ITlocker() { BSP::uniqueObject()->enableInterrupt(); }
		};

	private:
		BSP() {}
		~BSP() {}

	private:
		friend class MApplication;
		friend class MEventLoop;
		friend class MEventLoopPrivate;
		friend class MObject;
		friend class MIODevice;
		friend class __Atomic_Lock__;
};


#endif //BSP_H
